Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Cppcheck unknown C/C++ standard #4359

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bruntib
Copy link
Contributor

@bruntib bruntib commented Oct 10, 2024

Cppcheck tool is failing from version 2.15 if "--std=" flag is given an unknown value. For example, "--std=c++0x" is not known, but "--std=c++11" is. Before cppcheck-2.15 the latest known standard version was silently used.

In this patch the unknown standard versions are mapped to the known ones.

@bruntib bruntib added CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands bugfix 🔨 cppcheck 🐞 CppCheck is a static analysis tool for C++ code labels Oct 10, 2024
@bruntib bruntib added this to the release 6.25.0 milestone Oct 10, 2024
@bruntib bruntib requested a review from vodorok as a code owner October 10, 2024 11:29
Cppcheck tool is failing from version 2.15 if "--std=" flag is given
an unknown value. For example, "--std=c++0x" is not known, but
"--std=c++11" is. Before cppcheck-2.15 the latest known standard
version was silently used.

In this patch the unknown standard versions are mapped to the known
ones.
@bruntib bruntib force-pushed the cppcheck_standard_versions branch 2 times, most recently from 4cbff61 to c965ba3 Compare October 11, 2024 07:44
When a C/C++ standard version is provided both in the original build
command and the --cppcheckargs file, then only the one in --cppcheckargs
should be used in the analyzer command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix 🔨 CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands cppcheck 🐞 CppCheck is a static analysis tool for C++ code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant